package com.security.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.dao.BaseEntity;

/**
 * 资源.
 * 
 * @author san
 */
@Entity
@Table(name = "base_resource_info")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Resource extends BaseEntity {

	private static final long serialVersionUID = -5396060046559398409L;

	@Column(nullable=false,unique=true)
	private String name;

	@Column(nullable=false,unique=true)
	private String path;

	@Column(nullable=false,unique=true)
	private String cnname;
	
	@Override
	public String toString() {
		return this.getCnname();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCnname() {
		return cnname;
	}

	public void setCnname(String cnname) {
		this.cnname = cnname;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

}